package com.dl.dlcommon.interceptor.exception.impl;

import com.dl.dlcommon.interceptor.exception.ExceptionHandlerStrategy;
import com.dl.dlcommon.utils.result.Result;

/**
 * 全局异常处理
 * @author DL
 * @create 2024-04-08 9:48
 */
public class GlobalExceptionHandler implements ExceptionHandlerStrategy {

    @Override
    public Result<?> handleException(Exception e) {
        e.printStackTrace();
        return Result.error("全局异常: " + e.getMessage());
    }
}
